home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / include / Xm / Protocols.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-30  |  3.9 KB  |  124 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
  3.  * ALL RIGHTS RESERVED 
  4. */ 
  5. /* 
  6.  * Motif Release 1.2.3
  7. */ 
  8. /*   $RCSfile: Protocols.h,v $ $Revision: 10.1 $ $Date: 1994/02/03 15:45:23 $ */
  9. /*
  10. *  (c) Copyright 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  11. #ifndef _XmProtocols_h
  12. #define _XmProtocols_h
  13.  
  14. #include <Xm/Xm.h>
  15. #include <Xm/AtomMgr.h>
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. /* should be in XmP.h */
  22.  
  23. #ifndef XmCR_WM_PROTOCOLS
  24. #define XmCR_WM_PROTOCOLS 6666
  25. #endif /* XmCR_WM_PROTOCOLS */
  26.  
  27. /* define the XM_PROTOCOLS atom for use in  routines */
  28. #ifdef XA_WM_PROTOCOLS
  29. #define XM_WM_PROTOCOL_ATOM(shell) XA_WM_PROTOCOLS
  30. #else
  31. #define XM_WM_PROTOCOL_ATOM(shell) \
  32.     XmInternAtom(XtDisplay(shell),"WM_PROTOCOLS",FALSE)
  33. #endif /* XA_WM_PROTOCOLS */
  34.  
  35.  
  36. #define XmAddWMProtocols(shell, protocols, num_protocols) \
  37.       XmAddProtocols(shell, XM_WM_PROTOCOL_ATOM(shell), \
  38.              protocols, num_protocols)
  39.  
  40. #define XmRemoveWMProtocols(shell, protocols, num_protocols) \
  41.       XmRemoveProtocols(shell, XM_WM_PROTOCOL_ATOM(shell), \
  42.             protocols, num_protocols)
  43.  
  44. #define XmAddWMProtocolCallback(shell, protocol, callback, closure) \
  45.       XmAddProtocolCallback(shell, XM_WM_PROTOCOL_ATOM(shell), \
  46.                 protocol, callback, closure)
  47.  
  48. #define XmRemoveWMProtocolCallback(shell, protocol, callback, closure) \
  49.   XmRemoveProtocolCallback(shell, XM_WM_PROTOCOL_ATOM(shell), \
  50.                 protocol, callback, closure)
  51.  
  52. #define XmActivateWMProtocol(shell, protocol) \
  53.       XmActivateProtocol(shell, XM_WM_PROTOCOL_ATOM(shell), protocol)
  54.  
  55. #define XmDeactivateWMProtocol(shell, protocol) \
  56.       XmDeactivateProtocol(shell, XM_WM_PROTOCOL_ATOM(shell), protocol)
  57.  
  58. #define XmSetWMProtocolHooks(shell, protocol, pre_h, pre_c, post_h, post_c) \
  59.       XmSetProtocolHooks(shell, XM_WM_PROTOCOL_ATOM(shell), \
  60.              protocol, pre_h, pre_c, post_h, post_c)
  61.  
  62.  
  63. /********    Public Function Declarations    ********/
  64. #ifdef _NO_PROTO
  65.  
  66. extern void XmAddProtocols() ;
  67. extern void XmRemoveProtocols() ;
  68. extern void XmAddProtocolCallback() ;
  69. extern void XmRemoveProtocolCallback() ;
  70. extern void XmActivateProtocol() ;
  71. extern void XmDeactivateProtocol() ;
  72. extern void XmSetProtocolHooks() ;
  73.  
  74. #else
  75.  
  76. extern void XmAddProtocols( 
  77.                         Widget shell,
  78.                         Atom property,
  79.                         Atom *protocols,
  80.                         Cardinal num_protocols) ;
  81. extern void XmRemoveProtocols( 
  82.                         Widget shell,
  83.                         Atom property,
  84.                         Atom *protocols,
  85.                         Cardinal num_protocols) ;
  86. extern void XmAddProtocolCallback( 
  87.                         Widget shell,
  88.                         Atom property,
  89.                         Atom proto_atom,
  90.                         XtCallbackProc callback,
  91.                         XtPointer closure) ;
  92. extern void XmRemoveProtocolCallback( 
  93.                         Widget shell,
  94.                         Atom property,
  95.                         Atom proto_atom,
  96.                         XtCallbackProc callback,
  97.                         XtPointer closure) ;
  98. extern void XmActivateProtocol( 
  99.                         Widget shell,
  100.                         Atom property,
  101.                         Atom proto_atom) ;
  102. extern void XmDeactivateProtocol( 
  103.                         Widget shell,
  104.                         Atom property,
  105.                         Atom proto_atom) ;
  106. extern void XmSetProtocolHooks( 
  107.                         Widget shell,
  108.                         Atom property,
  109.                         Atom proto_atom,
  110.                         XtCallbackProc pre_hook,
  111.                         XtPointer pre_closure,
  112.                         XtCallbackProc post_hook,
  113.                         XtPointer post_closure) ;
  114.  
  115. #endif /* _NO_PROTO */
  116. /********    End Public Function Declarations    ********/
  117.  
  118.  
  119. #ifdef __cplusplus
  120. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  121. #endif
  122.  
  123. #endif /* _XmProtocols_h */
  124.